import java.io.*;

public class TestRunner {
	// return false if fail
	public static void main(String[] args) {
		System.out.print(runTest(System.out));
	}
	public static boolean runTest(PrintStream out){
		try {
			// Part 0 Task 1
			Ex0.f(1);
			out.println(0);
			//======= Part 1 =======
			// Task 1
			Ex1.tilesPack1a(1);
			out.println("1a");
			Ex1.tilesPack1b(1);
			out.println("1b");
			Ex1.tilesPack1b(2, new long[2]);
			// Task 2
			out.println("1b");
			Ex1.tilesPack2(1);
			out.println("2");
			// Task 3
			Ex1.tilesPack3(2);
			
			out.println("3");
			//======= Part 2 =======
			int[][] points = {{1,1},{2,2}};
			// Task 1 
			Ex2.findClosestSimple(points);
			// Task 2a
			Ex2.sortByLex(points);
			// Task 2b
			Ex2.sortByY(points);
			// Task 2c
			Ex2.duplicates(points);
			// Task 2d
			Ex2.filterPointsByRange(1.0, 2.0, points);
			// Task 3
			Ex2.findClosest(points);

			//======= Part 3 =======
			int[][][] board = new int[3][3][];
			int[] tile = {1, 2, 3, 4};
			// Task 1
			Ex3.canPut(tile,1,1,board);
			// Task 2
			Ex3.put(tile,1,1,board);
			// Task 3a
			Ex3.delete(0,new int[][] {tile});
			// Task 3b
			Ex3.rotate(1, tile);
			// Task 4
			Ex3.solve(new int[][] {{0,0,0,0}});

		} catch(Exception e){
			out.println("ERROR: " + e.getMessage());
			return false;
		}

		return true;
	}
}